import { createRouter, createWebHistory, RouteRecordRaw} from 'vue-router'
import Notfound from '../views/error/not-found.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/home',
    name: 'CompuMethod',
 
    component: () => import('../views/error/index.vue')

  },
  {
    path: '/home',
    name: 'identical',
 
    component: () => import('../views/compu-method/identical.vue')

  },
  {
    path: '/home',
    name: 'linear', 
    component: () => import('../views/compu-method/linear.vue')
  },
  {
    path: '/home',
    name: 'scale-linear', 
    component: () => import('../views/compu-method/scale-linear.vue')
  },
  {
    path: '/home',
    name: 'text-table', 
    component: () => import('../views/compu-method/text-table.vue')
  },
  {
    path: '/home',
    name: 'linear-and-text-table', 
    component: () => import('../views/compu-method/linear-and-text-table.vue')
  },
  {
    path: '/home',
    name: 'bitfield-text-table', 
    component: () => import('../views/compu-method/bitfield-text-table.vue')
  },
  {
    path: '/home',
    name: 'unit', 
    component: () => import('../views/units/unit.vue')
  },
  {
    path: '/home',
    name: 'unitgroup', 
    component: () => import('../views/units/unitgroup.vue')
  },
  {
    path: '/home',
    name: 'Units', 
    component: () => import('../views/error/index.vue')
  },
  {
    path: '/home',
    name: 'mapping-set', 
    component: () => import('../views/physical/mapping-set.vue')
  },
  {
    path: '/home',
    name: 'physical-dimention', 
    component: () => import('../views/physical/physical-dimention.vue')
  }
  ,{
    path: "/:pathMatch(.*)*",
    name: "notFound",
    component: Notfound,  // 引入 组件
  } 
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
